#include<iostream>
using namespace std;
typedef long long LL;
const LL MOD = 1e11 + 3, N = 1e7 + 10;
LL arr[N];
int main()
{
	int n;
	cin >> n;
	arr[1] = 1;
	arr[2] = 3;
	LL sum = 4;
	if (n == 1) {
		cout << 1 << endl;
		return 0;
	}
	if (n == 2) {
		cout << 4 << endl;
		return 0;
	}
	if (n == 3) {
		cout << 8 << endl;
		return 0;
	}
	for (int i = 3; i <= n; i++) {
		arr[i] = arr[i - 1] % MOD + arr[i - 2] % MOD;
		arr[i] %= MOD;
		sum += arr[i];
		sum %= MOD;
		//cout << arr[i] << " ";
	}
	/*for (int i = 1; i <= n; i++) {
		cout << arr[i] << " ";
	}*/
	cout << sum << endl;
	return 0;
}